DELETE t FROM c1_role_permission t WHERE NOT EXISTS (SELECT 1 FROM c1_Role e WHERE e.id = t.`ROLE_ID`)